//
//  BiliHeaderDynamic.swift
//  Landmarks
//
//  Created by 温哲 on 2021/2/10.
//

import SwiftUI

struct BiliHeaderDynamic: View {
    var name: String
    var num: Int
    var body: some View {
        HStack {
            Spacer()
            Text(num>99 ? "99+" : num.description)+Text("\n") + Text(name).foregroundColor(Color(hex: 0xFF666666))

            Spacer()
        }
    }
}

struct BiliHeaderDynamic_Previews: PreviewProvider {
    static var previews: some View {
        BiliHeaderDynamic(name: "标题", num: 999)
    }
}
